package com.ysstech.reportworld.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 报表世界基础数据配置信息表
 * </p>
 *
 * @author lishuangliang
 * @since 2022-12-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("report_world_database_config")
public class DatabaseConfig extends Model<DatabaseConfig> {

    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private String id;

    /**
     * 基础数据对应的编号
     */
    @TableField("DATABASE_ID")
    private String databaseId;

    /**
     * 确定唯一数据字段
     */
    @TableField("ONLY_COLUMN")
    private String onlyColumn;

    /**
     * 主键字段
     */
    @TableField("PRIMARY_KEY_COLUMN")
    private String primaryKeyColumn;

    /**
     * 原始表真实主键
     */
    @TableField("PRIMARY_KEY_COLUMN_REAL")
    private String primaryKeyColumnReal;
    /**
     * 查询条件字段
     */
    @TableField("SELECT_COLUMN")
    private String selectColumn;

    /**
     * 显示字段
     */
    @TableField("SHOW_COLUMN")
    private String showColumn;

    /**
     * 排序字段
     */
    @TableField("ORDER_COLUMN")
    private String orderColumn;

    @TableField("STATUS")
    private Integer status;
    /*
     *  是否区分数库类型
     */
    @TableField("DATA_TYPE")
    private Integer dataType;


    @TableField("ADD_TIME")
    private LocalDateTime addTime;

    @TableField("ADD_USER")
    private String addUser;

    @TableField("EDIT_TIME")
    private LocalDateTime editTime;

    @TableField("EDIT_USER")
    private String editUser;

    @TableField("DELETE_REASON")
    private String deleteReason;
    //基础数据编码
    @TableField(exist = false)
    private String code;

    //基础数据编码名称
    @TableField(exist = false)
    private String dataBaseName;

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
